package com.example.test;

import java.io.File;

/**
 * Create with Intellij idea
 * User:鲁智明
 * Date:2018/10/14
 * Time:21:43
 *  文件移动 及重命名
 */
public class test0013 {
    public static void main(String[] args) {
        File file1=new File("E:\\work\\com\\test1.txt");
        File file2=new File("E:\\work\\com\\entity\\test.txt");
//        boolean isDelete=file2.delete();
//        if(!isDelete){
//            System.out.println("删除失败!");
//            return;
//        }
        file1.renameTo(file2);
        System.out.println(file1.renameTo(file2));
    }
}
